package day08HomeWrok;

public abstract class Animal {//abstract 抽象类
    String name;
    int age;
    String color;

    Animal() {
    }

    Animal(String name, int age, String color) {
        this.name = name;
        this.age = age;
        this.color = color;
    }

    void drink() {
        System.out.println(color + "色的" + age + "岁的" + name + "正在喝水...");
    }

    abstract void eat();//抽象方法要在冲抽象类中
    //父类的抽象方法 要在子类里面重新写一遍
}

